package com.bnzj.core.exception;

import com.bnzj.core.rest.ResultCode;

/**
 * 
 * @ClassName: BusinessException
 * @Description: 业务异常类
 * @date 2015年4月11日 下午1:16:59
 *
 */
public class BusinessException extends RuntimeException {

	private static final long serialVersionUID = 1947662574968918079L;

	private final ResultCode resultCode;
	
    public BusinessException(String msg, int errNo) {
        this(new ResultCode(errNo, msg));
    }
    
    public BusinessException(ResultCode resultCode) {
        this.resultCode = resultCode;
    }
	
	public BusinessException(String msg, String errNo) {
        this(new ResultCode(Integer.valueOf(errNo), msg));
	}

    public ResultCode getResultCode() {
        return resultCode;
    }
}
